import { UserDto } from "@/models/User/UserDto";
import { HttpClient } from "@/utils/HttpClient";



/**
 * 用户登录服务
 */
export class UserService {

    /**
     * 用户登录
     * @param request 
     * @returns 
     */
    static async loginAsync(request: UserDto.LoginRequest) {
        return await HttpClient.post<any>("User/Login", request, false);
    }

    /**
     * 用户注册
     * @param request 
     * @returns 
     */
    static async registerAsync(request: UserDto.RegisterRequest) {
        return await HttpClient.post<any>("User/Register", request, false);
    }
}